package com.it.dao;

import com.it.domain.Singer;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SingerMapper {

    int AddSinger(Singer singer);//增加

    int updateSinger(Singer singer);//修改

    @Delete("delete from singer where id = #{id}")
    int deleteSinger(Integer id);//删除

    Singer SelectBid(Integer id);//id查询


    List<Singer> SelectAll(@Param("PageNum") Integer PageNum, @Param("PageSize") Integer PageSize, @Param("name") String name);//查询所有

    @Select("select * from singer where name like #{name}")
    List<Singer> SelectByName(String name);//用户名模糊查询

    @Select("select count(*) from singer")
    int SelectTotal();

    List<Singer> GetAll();

    Singer SelectIsExist(String name, Byte sex);

    List<Singer> getSingerLists(@Param("ids") Integer[] ids);

}
